home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 121 / Computer Shopper 121 / Computer Shopper 121.iso / HomeBus / money / Money98 / MONEY98.1 / SAVAPP.DCR / 00008_getValues.ls < prev    next >
Encoding:
Text File  |  1997-10-10  |  1.7 KB  |  49 lines

  1. on getValues
  2.   global currentAffected, total, initial, annual, term, rate, tvalue, rvalue, ivalue, avalue, yvalue
  3.   if not (currentAffected = "t") then
  4.     set incomeString to line 1 of the text of member "total"
  5.     calcNum(incomeString)
  6.     set incomeString to the result
  7.     set tvalue to value(incomeString)
  8.     calcDollar(incomeString)
  9.     set incomeString to the result
  10.     set the text of member "total" to incomeString
  11.   end if
  12.   if not (currentAffected = "i") then
  13.     set incomeString to line 1 of the text of member "initial"
  14.     calcNum(incomeString)
  15.     set incomeString to the result
  16.     set ivalue to value(incomeString)
  17.     calcDollar(incomeString)
  18.     set incomeString to the result
  19.     set the text of member "initial" to incomeString
  20.   end if
  21.   if not (currentAffected = "a") then
  22.     set incomeString to line 1 of the text of member "annual"
  23.     calcNum(incomeString)
  24.     set incomeString to the result
  25.     set avalue to value(incomeString)
  26.     calcDollar(incomeString)
  27.     set incomeString to the result
  28.     set the text of member "annual" to incomeString
  29.   end if
  30.   if not (currentAffected = "r") then
  31.     set incomeString to line 1 of the text of member "rate"
  32.     calcNum(incomeString)
  33.     set incomeString to the result
  34.     set rvalue to value(incomeString)
  35.     set the text of member "rate" to rvalue & "%"
  36.   end if
  37.   if not (currentAffected = "y") then
  38.     set incomeString to line 1 of the text of member "term"
  39.     calcNum(incomeString)
  40.     set incomeString to the result
  41.     set yvalue to value(incomeString)
  42.     if yvalue = 1 then
  43.       set the text of member "term" to yvalue & " year"
  44.     else
  45.       set the text of member "term" to yvalue & " years"
  46.     end if
  47.   end if
  48. end
  49.